package com.tianji.learning.controller;


import com.tianji.learning.domain.vo.PointsStatisticsVO;
import com.tianji.learning.service.IPointsRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 学习积分记录，每个月底清零 前端控制器
 * </p>
 *
 * @author LYQ
 * @since 2024-06-30
 */
@Api(tags = "积分相关接口")
@RestController
@RequestMapping("/points")
@RequiredArgsConstructor
public class PointsRecordController {
    private final IPointsRecordService pointsRecordService;


    /**
     * 查询当前用户的当日积分统计情况
     *
     * @return
     */
    @ApiOperation("查询当前用户的当日积分统计情况")
    @GetMapping("/today")
    public List<PointsStatisticsVO> queryPointsStatistics() {
        return pointsRecordService.queryPointsStatistics();
    }

}
